Returns the IDictionary<string, SequencingObjectiveNodeReader> containing the <imsss:primaryObjective> and <imsss:objective> nodes under the <imsss:objectives> node, indexed by the string parameter, which is the objectiveID attribute of the objective node. The value of the dictionary is SequencingObjectiveNodeReader.
Parent Type: SequencingNodeReader
Namespace: Microsoft.LearningComponents.Manifest
Assembly: Microsoft.LearningComponents.dll
| C# |
|
public IDictionary<string,SequencingObjectiveNodeReader> Objectives { get; } |
| Exception type | Condition |
| InvalidPackageException | In |
The IDictionary returned from this method is not populated until properties or methods on it are accessed, e.g. IDictionary.ContainsKey, Keys, or accessing the enumerator. In ManifestReaderSettings.FixScormRequirementViolations=false, InvalidPackageException will be thrown if there are invalid nodes in the list (e.g. nodes containing illegal attribute values.)
Calling any property or method the first time results in an n-order operation as all nodes are scanned and objects created.
In ManifestReaderSettings.FixScormRequirementViolations=true, warnings are added to the log and invalid nodes are ignored.
If there are no nodes of the specified type, an empty IDictionary is returned.
Note that if this sequencing node has a valid IDRef attribute, if there is no <imsss:objectives> node in this sequencing node, the values inside the <imsss:objectives> node in the sequencing node referenced by IDRef is returned.
In the case of primary objectives, SCORM permits the objectiveID attribute to be absent if there are no <mapInfo> nodes contained within the primary objective. When this happens, the objectiveID will be String.Empty, which will be the index into this IDictionary.
Loop through all objectives in the sequencingCollection.
| C# |
foreach(SequencingNodeReader sequencing in manifest.SequencingCollection.Values)
{
foreach (SequencingObjectiveNodeReader objective in sequencing.Objectives.Values)
{
// Use the SequencingObjectiveNodeReader
}
}
|